extends CanvasLayer
signal cszw()
signal renwudangan
@onready var click_sound: AudioStreamPlayer2D = $ClickSound
@onready var zhuiwen: Button = $HBoxContainer/Zhuiwen

# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	pass # Replace with function body.


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta: float) -> void:
	if Dialogic.VAR.xwks:
		zhuiwen.visible=true
	else:
		zhuiwen.visible=false
	if Dialogic.VAR.pwq:
		self.visible=false

func _on_zhuiwen_pressed() -> void:
	click_sound.play()
	if Dialogic.VAR.xwks:
		Global.zhuiwen()
		Dialogic.VAR.zw=true

func _on_zhengwu_pressed() -> void:
	click_sound.play()
	self.visible=true
	cszw.emit()


func _on_renwu_pressed() -> void:
	click_sound.play()
	self.visible=true
	renwudangan.emit()
